using UnityEngine;
using UnityEngine.UI;

namespace MaterialUI
{
	public class ProgressIndicator : MonoBehaviour, ILayoutElement
	{
		[SerializeField]
		[Range(0f, 1f)]
		protected float m_CurrentProgress;

		[SerializeField]
		private RectTransform m_BaseObjectOverride;

		private RectTransform m_RectTransform;

		[SerializeField]
		protected bool m_StartsIndeterminate;

		[SerializeField]
		protected bool m_StartsHidden;

		protected bool m_IsAnimatingIndeterminate;

		public float currentProgress => m_CurrentProgress;

		public RectTransform baseObjectOverride
		{
			get
			{
				return m_BaseObjectOverride;
			}
			set
			{
				m_BaseObjectOverride = value;
			}
		}

		protected RectTransform scaledRectTransform => (!(m_BaseObjectOverride != null)) ? rectTransform : m_BaseObjectOverride;

		public RectTransform rectTransform
		{
			get
			{
				if (m_RectTransform == null)
				{
					m_RectTransform = (RectTransform)base.transform;
				}
				return m_RectTransform;
			}
		}

		public float preferredWidth => -1f;

		public float minWidth => GetMinWidth();

		public float flexibleWidth => -1f;

		public float preferredHeight => -1f;

		public float minHeight => GetMinHeight();

		public float flexibleHeight => -1f;

		public int layoutPriority => -1;

		public virtual void Show(bool startIndeterminate = true)
		{
		}

		public virtual void Hide()
		{
		}

		public virtual void StartIndeterminate()
		{
		}

		public virtual void SetProgress(float progress, bool animated = true)
		{
		}

		public virtual void SetColor(Color color)
		{
		}

		public virtual float GetMinWidth()
		{
			return -1f;
		}

		public virtual float GetMinHeight()
		{
			return -1f;
		}

		public void CalculateLayoutInputHorizontal()
		{
		}

		public void CalculateLayoutInputVertical()
		{
		}
	}
}
